home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / EatAU Source / EatAU Read ME next >
Encoding:
Text File  |  1993-12-02  |  3.4 KB  |  34 lines  |  [TEXT/ttxt]

  1. EatAU
  2. -----
  3. A QuickTime component for importing Sun audio files (.au).
  4.  
  5. Concept
  6.   Components are wonderful things.  The Component Manager is your friend.  However there is no decent (Pascal) sample code out there for writing components.  Worst of all is the official Apple sample code which, as far as I can see, just doesn't work.  [Whoever wrote the component sample code in the QT 1.5 developer kit obviously didn't know anything about Pascal.  Sad.]
  7.   Sun audio files are quite common on the net but they can be very hard to play on your Mac.  The nicest tool around (Ulaw 1.4) has a habit of crashing when you give it slightly deviant sound files.
  8.   QuickTime supports components for converting data from arbitrary file formats to movies.  These components are fairly easy to write and don't need a user interface (yay!).  A good example of this is the audio CD import component that shipped with QuickTime 1.6.
  9.   I decided to combine these facts together and write a simple component for importing Sun audio files into QuickTime movies.
  10.  
  11. Building the Code
  12.   You can build the code using Think Pascal.  It wouldn't take too much bashing to get it to compile under MPW but that's your problem.  You will need the latest QuickTime interfaces, which you can FTP from ftp.apple.com in the directory /dts/mac/sys.soft/quicktime/interfaces.  Don't expect them to compile 'out of the box' -- you'll have to do some hacking and slaying to get them to work.  [Apple, test their interfaces?  Never!]  Specifically you have to rename some formal parameters so that they don't clash with their type names which only differ in case.
  13.   Other than that it should be fairly easy to compile (:
  14.  
  15. Using the Component
  16.   Once you've built the component you can install it by dragging it into your Extensions folder and rebooting.  Alternatively you can use a program like "Reinstaller" (from the developer CDs and other places) which will install it with having to reboot.  Reinstaller is a must for anyone seriouly developing components.  If you can't find it, write it yourself (:
  17.   Then FTP an Sun audio file (they normally have the .au extension) in *binary* mode and change the file type to 'ULAW' and the creator to 'TSUL'.  Then find any application which will open QuickTime movies (PopCorn is my suggestion) and open the sound.  You will be given the option of opening the sound by converting it to a movie.  You should even see a wonder progress dialog.
  18.   Although the component only handles single channel audio files with ULAW encoding it shouldn't be too hard to extend.
  19.  
  20. The Source Code
  21.   The source code is all pretty easy to understand.  It could be neater but, hell, every program I've ever written could be neater.  I think my component dispatch is pretty neat though (:  I could write more about the source by maybe I should go and put some comment in instead.
  22.  
  23. Credits
  24.   Thanks are due to Vic Heintz <Victor_J_Heintz.wbst128@xerox.com> whose published the source to his sun_audio2mac_linear program which provided all the information I needed to convert the file.  Thanks also to Jager for help with the QuickTime bits.
  25.  
  26. Contacts
  27.   If you have anything to say about this code please Email me, Quinn <quinn@cs.uwa.edu.au>.  I'll also leave this stuff available for anonymous FTP from redback.cs.uwa.edu.au (130.95.80.61) in the /Others/Quinn directory.  Please read the ReadMe before transferring files from Redback.
  28.  
  29. Share and Enjoy.
  30.  
  31. Quinn "The Eskimo!"
  32. <quinn@cs.uwa.edu.au>
  33. 2 Dec 1993
  34.